package model

import (
	"gorm.io/gorm"
	"time"
)

type Config struct {
	ID        uint           `gorm:"primaryKey;column:id;autoIncrement;comment:主键"`
	Key       string         `gorm:"column:key;size:100;default:'';not null;comment:键"`
	Value     string         `gorm:"type:text;column:value;comment:值"`
	Comment   string         `gorm:"column:comment;size:255;default:'';not null;comment:备注"`
	CreatedAt time.Time      `gorm:"column:created_at;comment:创建时间"`
	UpdatedAt time.Time      `gorm:"column:updated_at;comment:更新时间"`
	DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;index;comment:删除时间"`
}

func (Config) TableName() string {
	return "config"
}
